var mongoose = require('mongoose');
const path = require('path');
mongoose.Promise = global.Promise;
const winston = require('../utils/winstonLogger.js');
var managerModel = require('../models/Manager.js');
var managerDao  = require('../dao/managerDao');

//connect to mongodb
mongoose.set('debug',true);
mongoose.connect(
    'mongodb://localhost:27017/test',
    {useMongoClient:true}
).then(function(db){
    winston.info('DB connect success !!')
}).catch(function(err){
    winston.error('DB connect failed!!');
    winston.error(err.stack);
});



managerDao.queryManager({},(err, result)=>{
    if(err){
        
    }else{
        console.log("query manager success");
    }
});




